package com.woniuxy.service.impl;

import com.woniuxy.dao.RbacRoleDao;
import com.woniuxy.entity.RbacRole;
import com.woniuxy.service.RbacPermService;
import com.woniuxy.service.RbacRoleService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * @author: wgt
 * Date: 2021/11/14:21:09
 * Description:
 */
public class RbacRoleImpl implements RbacRoleService {

    ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
    RbacRoleDao rbacRoleDao=applicationContext.getBean("rbacRoleDao",RbacRoleDao.class);
    @Override
    public List<RbacPermService> findAll(int id) {
        return rbacRoleDao.findAll(id);
    }

    @Override
    public int save(RbacPermService rbacPerm) {
        return rbacRoleDao.save(rbacPerm);
    }

    @Override
    public int deleteById(RbacPermService id) {
        return rbacRoleDao.deleteById(id);
    }

    @Override
    public int update(RbacPermService rbacPerm) {
        return rbacRoleDao.update(rbacPerm);
    }
}
